package com.ndp.fb.enums.feed;

import java.util.ArrayList;
import java.util.List;

/**
 * Acceptable values are male, female, and unisex
 * Created by hunk.qin on 2016/4/20.
 */
public enum Gender {

    male("male"), female("female"), unisex("unisex");

    private  String value;
    Gender(String value){
        this.value=value;
    }

    public static List<String> getValues(){
        ArrayList<String> list=new ArrayList<>();
        for (Gender gender : Gender.values()) {
            list.add(gender.value);
        }
        return list;
    }

    public static boolean contain(String value){
        for (Gender gender : Gender.values()) {
            if (gender.value.equals(value)) {
                return true;
            }
        }
        return false;
    }
}
